package com.huabo.system.mysql.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author huabo
 * @since 2022-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("TBL_SYSTEM_RIGHT")
@ApiModel(value = "TblSystemRightMySql对象", description = "")
public class TblSystemRightMySql implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键Id 自增")
    @TableId("ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "select HBYUNRIGHT_SEQUENCE.nextval from dual")
    private BigDecimal id;

    @ApiModelProperty(value = "组件地址")
    @TableField("COMPONENT")
    private String component;

    @ApiModelProperty(value = "图标")
    @TableField("ICON")
    private String icon;

    @ApiModelProperty(value = "是否外链0否1是")
    @TableField("ISLINK")
    private Integer islink;

    @ApiModelProperty(value = "名称")
    @TableField("NAME")
    private String name;

    @ApiModelProperty(value = "上级ID")
    @TableField("PARENT")
    private Integer parent;

    @ApiModelProperty(value = "路由地址")
    @TableField("PATH")
    private String path;

    @ApiModelProperty(value = "唯一标识")
    @TableField("PERMS")
    private String perms;

    @ApiModelProperty(value = "排序越小越靠前")
    @TableField("SORT")
    private Integer sort;

    @ApiModelProperty(value = "类型0目录1页面2操作")
    @TableField("TYPE")
    private Integer type;

    @ApiModelProperty(value = "是否隐藏1否0是")
    @TableField("VISIBLE")
    private Integer visible;

    @TableField("MODULETYPE")
    @ApiModelProperty(value = "所属模块,   智能监控 - znjk 合同管理-htgl 内控合规 -nkhg 系统设置-xtsz 智能审计-znsj 智能分析-znfx 业务管控财经实训等后续新增的一级权限 为该权限的Id")
    private String moduletype;


    @Transient
    @ApiModelProperty(value = "子集集合")
    private List<TblSystemRightMySql> children;

    @Transient
    @ApiModelProperty(value = "是否授权 true有   false没有")
    private boolean checked = true;
}
